/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.smarttmt.idu.web.persistence.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Nicolás Rubén Caballero Ortega (helaman58@gmail.com)
 */
@Entity
@Table(name = "USUACONT")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Usuacont.findAll", query = "SELECT u FROM Usuacont u"),
    @NamedQuery(name = "Usuacont.findByUscocodi", query = "SELECT u FROM Usuacont u WHERE u.uscocodi = :uscocodi"),
    @NamedQuery(name = "Usuacont.findByUsconomb", query = "SELECT u FROM Usuacont u WHERE u.usconomb = :usconomb"),
    @NamedQuery(name = "Usuacont.findByUscopass", query = "SELECT u FROM Usuacont u WHERE u.uscopass = :uscopass"),
    @NamedQuery(name = "Usuacont.findByUscomail", query = "SELECT u FROM Usuacont u WHERE u.uscomail = :uscomail"),
    @NamedQuery(name = "Usuacont.findByUscocldi", query = "SELECT u FROM Usuacont u WHERE u.uscocldi = :uscocldi"),
    @NamedQuery(name = "Usuacont.findByUscodoid", query = "SELECT u FROM Usuacont u WHERE u.uscodoid = :uscodoid"),
    @NamedQuery(name = "Usuacont.findByUscoprnm", query = "SELECT u FROM Usuacont u WHERE u.uscoprnm = :uscoprnm"),
    @NamedQuery(name = "Usuacont.findByUscosenm", query = "SELECT u FROM Usuacont u WHERE u.uscosenm = :uscosenm"),
    @NamedQuery(name = "Usuacont.findByUscoprap", query = "SELECT u FROM Usuacont u WHERE u.uscoprap = :uscoprap"),
    @NamedQuery(name = "Usuacont.findByUscoseap", query = "SELECT u FROM Usuacont u WHERE u.uscoseap = :uscoseap"),
    @NamedQuery(name = "Usuacont.findByUscotele", query = "SELECT u FROM Usuacont u WHERE u.uscotele = :uscotele"),
    @NamedQuery(name = "Usuacont.findByUscotelm", query = "SELECT u FROM Usuacont u WHERE u.uscotelm = :uscotelm"),
    @NamedQuery(name = "Usuacont.findByUscodire", query = "SELECT u FROM Usuacont u WHERE u.uscodire = :uscodire"),
    @NamedQuery(name = "Usuacont.findByUscoterm", query = "SELECT u FROM Usuacont u WHERE u.uscoterm = :uscoterm"),
    @NamedQuery(name = "Usuacont.findByUscodigi", query = "SELECT u FROM Usuacont u WHERE u.uscodigi = :uscodigi"),
    @NamedQuery(name = "Usuacont.findByUscopers", query = "SELECT u FROM Usuacont u WHERE u.uscopers = :uscopers"),
    @NamedQuery(name = "Usuacont.findByUscoperf", query = "SELECT u FROM Usuacont u WHERE u.uscoperf = :uscoperf"),
    @NamedQuery(name = "Usuacont.findByUscoesta", query = "SELECT u FROM Usuacont u WHERE u.uscoesta = :uscoesta"),
    @NamedQuery(name = "Usuacont.findByUscofemo", query = "SELECT u FROM Usuacont u WHERE u.uscofemo = :uscofemo"),
    @NamedQuery(name = "Usuacont.findByUscofecr", query = "SELECT u FROM Usuacont u WHERE u.uscofecr = :uscofecr")})
public class Usuacont implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "USCOCODI")
    private BigDecimal uscocodi;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "USCONOMB")
    private String usconomb;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "USCOPASS")
    private String uscopass;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 100)
    @Column(name = "USCOMAIL")
    private String uscomail;
    @Size(max = 5)
    @Column(name = "USCOCLDI")
    private String uscocldi;
    @Size(max = 20)
    @Column(name = "USCODOID")
    private String uscodoid;
    @Size(max = 50)
    @Column(name = "USCOPRNM")
    private String uscoprnm;
    @Size(max = 50)
    @Column(name = "USCOSENM")
    private String uscosenm;
    @Size(max = 50)
    @Column(name = "USCOPRAP")
    private String uscoprap;
    @Size(max = 50)
    @Column(name = "USCOSEAP")
    private String uscoseap;
    @Size(max = 12)
    @Column(name = "USCOTELE")
    private String uscotele;
    @Size(max = 12)
    @Column(name = "USCOTELM")
    private String uscotelm;
    @Size(max = 100)
    @Column(name = "USCODIRE")
    private String uscodire;
    @Size(max = 60)
    @Column(name = "USCOTERM")
    private String uscoterm;
    @Size(max = 30)
    @Column(name = "USCODIGI")
    private String uscodigi;
    @Size(max = 6)
    @Column(name = "USCOPERS")
    private String uscopers;
    @Size(max = 5)
    @Column(name = "USCOPERF")
    private String uscoperf;
    @Size(max = 5)
    @Column(name = "USCOESTA")
    private String uscoesta;
    @Column(name = "USCOFEMO")
    @Temporal(TemporalType.TIMESTAMP)
    private Date uscofemo;
    @Column(name = "USCOFECR")
    @Temporal(TemporalType.TIMESTAMP)
    private Date uscofecr;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "usuacont", fetch = FetchType.LAZY)
    private List<Uscochip> uscochipList;

    public Usuacont() {
    }

    public Usuacont(BigDecimal uscocodi) {
        this.uscocodi = uscocodi;
    }

    public Usuacont(BigDecimal uscocodi, String usconomb, String uscopass, String uscomail) {
        this.uscocodi = uscocodi;
        this.usconomb = usconomb;
        this.uscopass = uscopass;
        this.uscomail = uscomail;
    }

    public BigDecimal getUscocodi() {
        return uscocodi;
    }

    public void setUscocodi(BigDecimal uscocodi) {
        this.uscocodi = uscocodi;
    }

    public String getUsconomb() {
        return usconomb;
    }

    public void setUsconomb(String usconomb) {
        this.usconomb = usconomb;
    }

    public String getUscopass() {
        return uscopass;
    }

    public void setUscopass(String uscopass) {
        this.uscopass = uscopass;
    }

    public String getUscomail() {
        return uscomail;
    }

    public void setUscomail(String uscomail) {
        this.uscomail = uscomail;
    }

    public String getUscocldi() {
        return uscocldi;
    }

    public void setUscocldi(String uscocldi) {
        this.uscocldi = uscocldi;
    }

    public String getUscodoid() {
        return uscodoid;
    }

    public void setUscodoid(String uscodoid) {
        this.uscodoid = uscodoid;
    }

    public String getUscoprnm() {
        return uscoprnm;
    }

    public void setUscoprnm(String uscoprnm) {
        this.uscoprnm = uscoprnm;
    }

    public String getUscosenm() {
        return uscosenm;
    }

    public void setUscosenm(String uscosenm) {
        this.uscosenm = uscosenm;
    }

    public String getUscoprap() {
        return uscoprap;
    }

    public void setUscoprap(String uscoprap) {
        this.uscoprap = uscoprap;
    }

    public String getUscoseap() {
        return uscoseap;
    }

    public void setUscoseap(String uscoseap) {
        this.uscoseap = uscoseap;
    }

    public String getUscotele() {
        return uscotele;
    }

    public void setUscotele(String uscotele) {
        this.uscotele = uscotele;
    }

    public String getUscotelm() {
        return uscotelm;
    }

    public void setUscotelm(String uscotelm) {
        this.uscotelm = uscotelm;
    }

    public String getUscodire() {
        return uscodire;
    }

    public void setUscodire(String uscodire) {
        this.uscodire = uscodire;
    }

    public String getUscoterm() {
        return uscoterm;
    }

    public void setUscoterm(String uscoterm) {
        this.uscoterm = uscoterm;
    }

    public String getUscodigi() {
        return uscodigi;
    }

    public void setUscodigi(String uscodigi) {
        this.uscodigi = uscodigi;
    }

    public String getUscopers() {
        return uscopers;
    }

    public void setUscopers(String uscopers) {
        this.uscopers = uscopers;
    }

    public String getUscoperf() {
        return uscoperf;
    }

    public void setUscoperf(String uscoperf) {
        this.uscoperf = uscoperf;
    }

    public String getUscoesta() {
        return uscoesta;
    }

    public void setUscoesta(String uscoesta) {
        this.uscoesta = uscoesta;
    }

    public Date getUscofemo() {
        return uscofemo;
    }

    public void setUscofemo(Date uscofemo) {
        this.uscofemo = uscofemo;
    }

    public Date getUscofecr() {
        return uscofecr;
    }

    public void setUscofecr(Date uscofecr) {
        this.uscofecr = uscofecr;
    }

    @XmlTransient
    public List<Uscochip> getUscochipList() {
        return uscochipList;
    }

    public void setUscochipList(List<Uscochip> uscochipList) {
        this.uscochipList = uscochipList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (uscocodi != null ? uscocodi.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Usuacont)) {
            return false;
        }
        Usuacont other = (Usuacont) object;
        if ((this.uscocodi == null && other.uscocodi != null) || (this.uscocodi != null && !this.uscocodi.equals(other.uscocodi))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.smarttmt.idu.web.persistence.entity.Usuacont[ uscocodi=" + uscocodi + " ]";
    }
    
}
